package com.cwx.mychat.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cwx.mychat.entity.po.UserContact;
import com.cwx.mychat.entity.po.UserContactApply;
import com.cwx.mychat.exception.BusinessException;
import com.cwx.mychat.utils.R;

import java.util.Map;

public interface UserContactApplyService extends IService<UserContactApply> {
    /**
     * 添加联系人
     * @param verifyInfo
     * @param remark
     * @param group
     * @param permission
     * @param receiveId
     * @return
     */
    R addContact(String verifyInfo, String remark, Map group, Boolean permission, String receiveId, String helloMsg) throws BusinessException;

    /**
     * 展示联系人
     * @return
     */
    R showApplyContact();

    /**
     * 同意申请
     * @param applyId
     * @return
     */
    R agreeApply(String applyUserId, String receiveUserId, String applyId) throws BusinessException;

    /**
     * 拒绝申请
     * @param applyId
     * @return
     */
    R refuseApply(String applyUserId, String receiveUserId, String applyId) throws BusinessException;

    /**
     * 添加联系人
     */
    R addContact(String applyUserId, String receiveUserId,
                 String contactId, String applyInfo,
                 String remark, Integer contactType,
                 UserContact userContact
    ) throws BusinessException;

    /**
     * 获取所有申请好友信息
     * @param userId
     * @return
     */
    R getAllApply(String userId);
}
